find_package(Automoc4 REQUIRED)


include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

add_subdirectory(fakebackend)

set(wormholeserver_SRCS
   main.cpp wormholetrayicon.cpp clocktower.cpp snapshotmanager.cpp
 )


#kde4_add_kcfg_files(wormholeserver_SRCS settings.kcfgc )
#add_automoc4_target(wormholeserver_automoc wormholeserver_SRCS)

kde4_add_executable(wormholeserver ${wormholeserver_SRCS})

add_dependencies(wormholeserver wormholeserver_automoc)

target_link_libraries(wormholeserver ${KDE4_KDEUI_LIBS} libwormhole)

install(TARGETS wormholeserver DESTINATION ${BIN_INSTALL_DIR} )


########### install files ###############

install( FILES wormholeserver.desktop  DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES wormholeserver.kcfg  DESTINATION  ${KCFG_INSTALL_DIR} )
install(TARGETS wormholeserver          ${INSTALL_TARGETS_DEFAULT_ARGS})